<?php
//namespace core;
defined('BASEPATH') OR exit('No direct script access allowed');


class MY_Controller extends CI_Controller{

    public $access_token = "";
    public $uid = 0;
    public $username = "";
    public $nickname = "";
    public $my_info = [];

    function  __construct(){
        parent::__construct();
    }
}

class WD_Controller extends MY_Controller{

    public function __construct(){
        parent::__construct();
        $this->init();
    }

    public function init(){
        $this->load->library('session');
        $this->access_token = isset($_SESSION["access_token"]) ? $_SESSION["access_token"] : "";
        $this->uid = isset($_SESSION["uid"]) ? $_SESSION["uid"] : "";
        $this->username = isset($_SESSION["username"]) ? $_SESSION["username"] : "";
        $this->nickname = isset($_SESSION["nickname"]) ? $_SESSION["nickname"] : "";
        $this->my_info = isset($_SESSION["my_info"]) ? $_SESSION["my_info"] : "";
    }

}

?>